
package com.tebiecloud.act.client.constants;
/**
 * @author MI
 *
 */
public enum ResultEnum implements BaseResult{

	ACT_IMAGE_UPLOAD_FAILED(300501, "图片上传失败"),
    ACT_COLLECT_USER_NOTFUND(300502, "未授权不能收藏，请授权"),
    ACT_STOCKQTY_ERROR(300503, "库存不足"),
    ACT_NOT_EXIT(300504, "活动不存在"),
    ACT_STATUS_ERROR(300505, "活动已禁用"),
    ACT_TIMEOUT(300506, "活动已过期")
    ;
   

    private int code;

    private String message;

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    ResultEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public static Enum<ResultEnum> getValue(int code) {
		for (ResultEnum ele : values()) {
			if(ele.getCode()==code) return ele;
		}
		return null;
    }

}
